import { Alova } from '@/utils/http/alova/index';

// 消息日志信息数据结构
interface MessageLogInfo {
  infoId: string;
  msgId: string;
  mqttTopic: string;
  payload: string;
  receiveTime: string;
  handlingTime: string;
  remark: string;
  orgId: string;
}

// 分页查询结果结构
interface PageResult<T> {
  records: T[];
  total: number;
  size: number;
  current: number;
  orders: any[];
  optimizeCountSql: boolean;
  searchCount: boolean;
  countId: string | null;
  maxLimit: string | null;
  pages: number;
}

const baseApi = '/web/message/info';

/**
 * 获取消息日志列表
 */
export function getMessageLogList(params: any) {
  return Alova.Post<InResult<PageResult<MessageLogInfo>>>(baseApi + '/page', { params });
}
